From 89bbff5329afc3b05ccc14ef3cf733f35d8ea4d3 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 11 Apr 2006 10:40:03 +0100 Subject: [PATCH] Make event_pending() architecture-specific. PowerPC needs this because the domain can directly modify the hardware's "interrupts enabled" bit, and we don't want to patch Linux to replace all those accesses to use evtchn_upcall_mask instead. Signed-off-by: Hollis Blanchard --- xen/include/asm-ia64/event.h | 5 +++++ xen/include/asm-x86/event.h | 5 +++++ xen/include/xen/event.h | 5 ----- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/xen/include/asm-ia64/event.h b/xen/include/asm-ia64/event.h index 297351072d..32afe39795 100644 --- a/xen/include/asm-ia64/event.h +++ b/xen/include/asm-ia64/event.h @@ -32,4 +32,9 @@ static inline void evtchn_notify(struct vcpu *v) vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector); } +/* Note: Bitwise operations result in fast code with no branches. */ +#define event_pending(v) \ + (!!(v)->vcpu_info->evtchn_upcall_pending & \ + !(v)->vcpu_info->evtchn_upcall_mask) + #endif diff --git a/xen/include/asm-x86/event.h b/xen/include/asm-x86/event.h index d491d24313..ad1b9b245a 100644 --- a/xen/include/asm-x86/event.h +++ b/xen/include/asm-x86/event.h @@ -26,4 +26,9 @@ static inline void evtchn_notify(struct vcpu *v) smp_send_event_check_cpu(v->processor); } +/* Note: Bitwise operations result in fast code with no branches. */ +#define event_pending(v) \ + (!!(v)->vcpu_info->evtchn_upcall_pending & \ + !(v)->vcpu_info->evtchn_upcall_mask) + #endif diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h index 13b2b5f9be..f7dee3b75d 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -38,11 +38,6 @@ extern void send_guest_global_virq(struct domain *d, int virq); */ extern void send_guest_pirq(struct domain *d, int pirq); -/* Note: Bitwise operations result in fast code with no branches. */ -#define event_pending(v) \ - (!!(v)->vcpu_info->evtchn_upcall_pending & \ - !(v)->vcpu_info->evtchn_upcall_mask) - #define evtchn_pending(d, p) \ (test_bit((p), &(d)->shared_info->evtchn_pending[0])) -- 2.30.2